#ifndef __IRR_EVENTSENDER_3DIJOY_LINUX_H__
#define __IRR_EVENTSENDER_3DIJOY_LINUX_H__

#include "./Input3dijoy/include/bluetooth_remote.h"
#include <cstdio>
#include <vector>

namespace irr
{
  class CIrrDeviceStub;
}

class EventSender_3dijoy_Linux
{
public:
  bool Init(irr::CIrrDeviceStub* dev, int w, int h);

  void Term();

  void PostEvent2Irr();

  void _OccurAnAxisEvent(UINT16 keyCode, bool pressed);
  void _OccurAnMouseEvent();

  int _GetPos_RelX();
  int _GetPos_RelY();
private:
  struct JoyDevice
  {
    UINT8 deviceId;
    DEVICE_INFO deviceInfo;
  };

  std::vector<JoyDevice> devices;

  int displayW, displayH;
  DEVICE_DATA data;
  irr::CIrrDeviceStub* dev;
  unsigned char allKeys[256];
};

#endif // __IRR_EVENTSENDER_3DIJOY_LINUX_H__
